

	****************************************************************************
	**
	**
	**		NAME:		Imke Harbers
	**		DATE: 		July 29th, 2019
	**		PROJECT: 	Identity for all? World Development Manuscript -WD13003
	**					Code to generate figures in the paper 			
	**
	**				
	**		
	**
	****************************************************************************
	
	
	
***Preliminaries

*Please set directory as appropriate 

global dir "INSERTPATH"

* Figure 1
use "$dir\Figure 1.dta", clear 

graph bar (mean) timelypercent99   overallpercent99 (mean) timelypercent09 overallpercent09, over(entresid, sort(timelypercent99) label(angle(vertical) labsize(small)) axis(outergap(4))) exclude0 ytitle(Proportion) yline(1) ylabel(.4(0.1)1.2, labsize(small) angle(horizontal)) title(Proportion of Births Registered Compared to Number of Births Estimated in the Census, size(small)) legend(order(1 "Timely Registration 1999" 2 "Overall Registration 1999" 3 "Timely Registration 2009" 4 "Overall Registration 2009") size(small)) scheme(s1manual)

* Figure 2
use "$dir\Figure 2.dta", clear 

graph bar (mean) bias_timely (mean) bias_delayed if entresid < 33, over(entresid, gap(*1.2) label(angle(vertical) labsize(small))) ytitle(More Boys  -  More Girls) ytitle(, size(small) justification(center)) ylabel(, labsize(small) angle(horizontal)) title(, size(medium)) note(Cohort born between February 1999 and January 2000, size(small)) legend(order(1 "Timely Registration" 2 "Delayed Registration") size(small) nobox) scheme(s1manual)


* Figure 3
use "$dir\Figure 3.dta", clear

twoway (line ratio_birthyear_nat year, sort) (line ratio_regyear_nat year, sort), yline(1.011597808, lpattern(dash) lcolor(%80)) ylabel(.95(.05)1.05, angle(horizontal)) ymtick(, angle(horizontal)) xlabel(1985(5)2015) title(Male/Female Ratio) legend(order(1 "Ratio by Year of Birth" 2 "Ratio by Year of Registration")) scheme(s1manual)

* Figure 4
use "$dir\Figure 4.dta", clear

twoway (line delaymonthsreg year if gender == 0, sort) (line delaymonthsreg year if gender == 1, sort), ytitle(Average Delay (Months)) ylabel(20(20)100, angle(horizontal)) xtitle(Year of Registration) xlabel(1985(5)2015) legend(order(1 "Male" 2 "Female")) scheme(s1mono)


* Figure 5
use "$dir\Figure 5.dta", clear

twoway (line delaymonthsfemale birthyear if birthyear > 1984 & birthyear < 2011, yaxis(2) lpattern(vshortdash)) (line delaymonthsmale birthyear if birthyear > 1984 & birthyear < 2011, yaxis(2) lpattern(tight_dot)) (line femaledelaypercent birthyear if birthyear > 1984 & birthyear < 2011), ytitle(Percentage Difference) ylabel(100(1)105, angle(horizontal)) ytitle(Average Delay in Months, axis(2)) ylabel(4(2)12, angle(horizontal) axis(2)) xtitle(Year) xlabel(1985(5)2011) legend(order(3 "Difference between Female and Male Average (%)" 1 "Average Delay Female by Birthyear (Months)" 2 "Average Delay Male by Birthyear (Months)") notextfirst rows(3)) scheme(s1manual)
